package com.weishu.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.weishu.domain.TCwPayOrder;
import com.weishu.mapper.TCwPayOrderMapper;
import com.weishu.service.ITCwPayOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 支付订单（支付流水信息）Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-06
 */
@Service
public class TCwPayOrderServiceImpl implements ITCwPayOrderService
{
    @Autowired
    private TCwPayOrderMapper tCwPayOrderMapper;

    /**
     * 查询支付订单（支付流水信息）
     * 
     * @param id 支付订单（支付流水信息）主键
     * @return 支付订单（支付流水信息）
     */
    @Override
    public TCwPayOrder selectTCwPayOrderById(Long id)
    {
        return tCwPayOrderMapper.selectTCwPayOrderById(id);
    }

    /**
     * 查询支付订单（支付流水信息）列表
     * 
     * @param tCwPayOrder 支付订单（支付流水信息）
     * @return 支付订单（支付流水信息）
     */
    @Override
    public List<TCwPayOrder> selectTCwPayOrderList(TCwPayOrder tCwPayOrder)
    {
        return tCwPayOrderMapper.selectTCwPayOrderList(tCwPayOrder);
    }

    /**
     * 新增支付订单（支付流水信息）
     * 
     * @param tCwPayOrder 支付订单（支付流水信息）
     * @return 结果
     */
    @Override
    public int insertTCwPayOrder(TCwPayOrder tCwPayOrder)
    {
        tCwPayOrder.setCreateTime(DateUtils.getNowDate());
        return tCwPayOrderMapper.insertTCwPayOrder(tCwPayOrder);
    }

    /**
     * 修改支付订单（支付流水信息）
     * 
     * @param tCwPayOrder 支付订单（支付流水信息）
     * @return 结果
     */
    @Override
    public int updateTCwPayOrder(TCwPayOrder tCwPayOrder)
    {
        tCwPayOrder.setUpdateTime(DateUtils.getNowDate());
        return tCwPayOrderMapper.updateTCwPayOrder(tCwPayOrder);
    }

    /**
     * 批量删除支付订单（支付流水信息）
     * 
     * @param ids 需要删除的支付订单（支付流水信息）主键
     * @return 结果
     */
    @Override
    public int deleteTCwPayOrderByIds(Long[] ids)
    {
        return tCwPayOrderMapper.deleteTCwPayOrderByIds(ids);
    }

    /**
     * 删除支付订单（支付流水信息）信息
     * 
     * @param id 支付订单（支付流水信息）主键
     * @return 结果
     */
    @Override
    public int deleteTCwPayOrderById(Long id)
    {
        return tCwPayOrderMapper.deleteTCwPayOrderById(id);
    }

    /**
     * 根据日期区间查询
     *
     * @param tCwPayOrder
     * @return 支付订单（支付流水信息）集合
     */
    @Override
    public List<TCwPayOrder> selectTCwPayOrderListForDate(TCwPayOrder tCwPayOrder) {
        return tCwPayOrderMapper.selectTCwPayOrderListForDate(tCwPayOrder);
    }
}
